from typing import Any

from app.constants import NACOS_AUTH_SERVICE_NAME
from app.decorator.remote import RemoteApi
from app.enums.method import Method


class IAuthClient:

    @staticmethod
    @RemoteApi(method=Method.GET, service_name=NACOS_AUTH_SERVICE_NAME, path="/auth/userInfo/permissions")
    async def permissions(loginId: Any, loginType: str):
        """
        返回指定账号id所拥有的权限码集合
        :param loginId:  账号id
        :param loginType: 账号类型
        :return: 该账号id具有的权限码集合
        """
        ...

    @staticmethod
    @RemoteApi(method=Method.GET, service_name=NACOS_AUTH_SERVICE_NAME, path="/auth/userInfo/roles")
    async def roles(loginId: Any, loginType: str):
        """
        返回指定账号id所拥有的角色标识集合
        :param loginId:  账号id
        :param loginType: 账号类型
        :return: 该账号id具有的角色标识集合
        """
        ...
